home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr04 / edv340.zip / EDV.DOC < prev    next >
Text File  |  1992-12-09  |  15KB  |  309 lines

  1.            EDV - A font editor for VGA fonts, written by Rick Owens.
  2.  
  3.                               Version 3.40 (beta)
  4.  
  5. Are you tired of your drab, boring screens?  Does your VGA have a weird
  6. character set?  If so, there's hope!  If you have a VGA display, you can load
  7. any number of interesting fonts; with EDV, you can edit those fonts to your
  8. heart's content.
  9.  
  10.  
  11.                                   Legal junk:
  12.  
  13. This program is freeware, and is copyrighted 1992 by Rick Owens.  You are
  14. under no obligation to send money to me (or anyone else, for that matter) for
  15. this program.  In fact, I do not want this program to be distributed for a
  16. fee; you may give it away to anyone, but you may not charge them money beyond
  17. a reasonable cost for copying.  (For example, this program can be posted for
  18. downloading on a subscription board.)
  19.  
  20. WARNING:  You use this program at your own risk.  If anything goes wrong, no
  21. one else shall be held responsible for any problems you encounter.
  22.  
  23. Further warning:  This is a Beta release, and may well have bugs in it.
  24.  
  25. I'm not releasing the source code yet (if ever), because it's probably going
  26. to change radically before I'm done.  However, if you can't live without some
  27. particular bit of code, get in touch with me and we'll figure something out.
  28.  
  29. Notice that I haven't said anything about the fonts...  that's because fonts
  30. can't be copyrighted!  If this is news to you, take a look at COPYFONT.DOC
  31. (and if you've got access to the Federal Register, look up the reference).
  32. Note:  if you create a new font by modifying one of the ones in here, please
  33. use a new name rather than overwriting one of the ones in this archive, as a
  34. courtesy to everyone who gets a copy from you either directly or indirectly.
  35.  
  36. -----------------------------------------------------------------------------
  37.  
  38.                                Virus protection:
  39.  
  40. In order to protect this program against unauthorized modification, I've
  41. included Kevin Dean's CRC module.  If you ever get an error message telling
  42. you this program has been modified, you _may_ have a virus in your computer.
  43. Note that this is not certain; almost any modification, virus induced or not,
  44. will stop the program.  Unless you _know_ how the program was modified, you
  45. should immediately scan your system for viruses using your favorite scanner,
  46. just to be safe.  (I've been lucky enough to be hit by only one virus, and
  47. because of backups I was able to recover without too much trouble... I
  48. suggest that you take similar precautions, so that your files don't become
  49. statistics.)
  50.  
  51. Of course, this program is not completely safe from tampering; someone with
  52. skill and patience could decompile the program and patch over the CRC checks.
  53. However, simple mods (like a piggy-backed virus, or someone changing the text
  54. of messages) will be caught.
  55.  
  56. To those who like PKlite, Diet, or some other program compressor:  Sorry folks.
  57. Compressing this program qualifies as modification _in spades_.  If you're
  58. tight for space on your hard drive, move EDV to a floppy, or unzip it onto a
  59. RAM drive.  Or, if you can afford it, get a bigger hard drive.
  60.  
  61. There's one other downside to this... disk accessing.  The CRC check has to
  62. find and read the executable wherever it resides, which will make for a
  63. noticeable delay on slow systems.  Again, I'm sorry, but them's the breaks,
  64. folks.
  65.  
  66. -----------------------------------------------------------------------------
  67.  
  68. "Why?"
  69.  
  70. Good question; I'm glad you asked.  :)  I've always liked playing with fonts,
  71. and VGA fonts are no exception.  I found and started using the LOADFONT
  72. program, and had lots of fun.  However, there were some problems:  lots of
  73. the fonts were originally 8x14, which meant that boxes had annoying gaps in
  74. them; some fonts that were too small (i.e., 8x14 or less); some fonts were
  75. incomplete (e.g., no boxdraw characters at all), etc.  Some of those things
  76. can be corrected with a good binary file editor, but that's a kludge.  So,
  77. the next thing was to see if I could find a font editor.  I found several,
  78. but none were really satisfactory.  So, I wrote my own.  It doesn't have
  79. fancy menus, or wonderful graphics (in fact, the interface is text only), and
  80. it doesn't have all the features of other editors (yet, anyway!).  But... it
  81. does what I want, the way that I want (mostly, at least).  On the assumption
  82. that there are others who are interested in VGA fonts, I'm distributing the
  83. editor and my collection of fonts.  At this time, I don't plan to offer any
  84. support for the program; however, if you want to get in touch with me with
  85. suggestions, comments, criticisms, etc., feel free to do so.  If possible
  86. I'll reply.
  87.  
  88. As far as the name goes, it's short hand for "EDit Vga fonts".  I pronounce
  89. it "eedeevee", but you can pronounce it any way you want.  :)
  90.  
  91. So, how do you use it?  Type EDV and hit Enter!  After a moment, you'll be at
  92. the main edit screen, ready to go.
  93.  
  94. Notes on loading:  if the file is less than 4096 bytes, the program will
  95. assume that you're working with an 8 by n (where n < 16) font, and will
  96. convert it on entry.  The program will estimate the number of bytes (rows) per
  97. character, then prompt you for the same value.  If you like the estimate, just
  98. hit Enter; otherwise, type the correct value.  Note:  this conversion does NOT
  99. change the disk file.  You must save the font to make the conversion stick.
  100. The flip side of this is that if you want to keep the original, you should
  101. edit a copy and leave the original file alone.  Also, you can load fonts from
  102. the command line; the format is "EDV <fontname> [<fontname> ...]" where
  103. <fontname> is the full name of a font file (i.e., the base name and the
  104. extension; the path is optional).  Extra font names (i.e., a fifth name and
  105. beyond) will be ignored.
  106.  
  107. The Edit screen is the heart of the program.  Here you can view and edit the
  108. characters in the font.  The commands:
  109.  
  110. Key     Command
  111. ---     -------
  112. ESC     Exit.
  113. ?,F1    Display help.
  114. ~       Set the change flag to false.
  115. .       Move to the next character.
  116. ,       Move to the last character.
  117. >       Move forward ten characters.
  118. <       Move backward ten characters.
  119. Tab     Move to next frame.
  120. BackTab Move to last frame.  (BackTab is Shift-Tab.)
  121. Home,
  122. End,
  123. Page Up,
  124. Page Dn Move the cursor to the UL, LL, UR, or LR corner.
  125. M       Move to a particular character (hit the key for the character you
  126.         want to edit).
  127. F       try the font out.
  128. D       Return to the Default font (i.e., reset the VGA display).
  129. =       Copy rows C & D (12 & 13) over rows E & F (this helps when converting
  130.         8x14 fonts to 8x16).
  131. F2      As above, but works on all box draw characters within font,
  132.         plus the top integral character, etc.
  133. Alt-F2  Show characters for composite.  This will change the index for the
  134.         non-active frames when you're looking at a composite character (e.g.,
  135.         character 131, 'â', which is composed of 'a' and '^').  This covers
  136.         letters with diacritics (i.e., acutes, graves, carets/circumflexes,
  137.         tildes, diaereses/umlauts, and cedillas), the ae digraphs, the cent
  138.         sign, the pound/sterling symbol, the yen symbol, the pesetas symbol,
  139.         the florin/guilders symbol, the fractions, the +/- symbol, the less
  140.         than or equal/greater than or equal symbols, and the division symbol.
  141.         Also, this command will help with the upside down ? and ! characters,
  142.         the fill characters (176-178, 219-223), the set intersection symbol,
  143.         and the superscripted 2 and n characters.  Note: This won't do the job
  144.         for you; it just shifts the other frames to the appropriate
  145.         characters.  This will only serve as a guide.  _You_ will have to make
  146.         sure the buffers are loaded with the correct font (usually the same
  147.         one you're working on, but perhaps not always!), and _you_ will have
  148.         to do the combining/modifications.  Some are easy; for instance, the
  149.         upside down ! and ? can be built by copying the original character,
  150.         then flipping the character both ways.  Others, like the fractions and
  151.         the pound/sterling symbol usually have to be 'manually' built.
  152. Alt-M or
  153. Alt-O   Merge another character into the current one.  (This does a bitwise OR
  154.         with the specified character.)
  155. Alt-X   Same as Merge, except that the operation is XOR (eXclusive OR).
  156.  
  157. <space> Toggle the current bit/pixel.
  158. S       Save the current font.
  159. Alt-S   Save menu; allows you to save a font as a .COM file, a C source file,
  160.         a text file, or a raw font file (same as S, above).
  161. L       Load a font.
  162.  
  163. H       Flip the current character horizontally.
  164. V       Flip the current character vertically.
  165. C       Copy another character.  (Enter the frame # to copy from.)
  166. I       Import a range of characters from another font.
  167.         Note:  The range is imported _starting at the current character_.
  168. B       Blank out the current character.
  169. R       Reverse the current character (i.e., toggle all bits).
  170.  
  171. Alt-D   Display a directory of .FNT files.
  172.  
  173. To move the cursor around, use the arrow keys.
  174. To draw, hold the left Shift key and use the arrows.
  175. To erase, hold the right Shift key and use the arrows.
  176. To shift the character, hold down the Control key and use the arrows.
  177. To shift the current line, hold down the Alt key and use the left and right
  178. arrows.
  179.  
  180.  
  181. Note:  Don't try to use the Move command to edit character 3; the ^C will
  182. kill the program.  Also, if you want to move to one of the high ASCII
  183. characters, you don't need to use the M command, just enter the character
  184. directly.  (For those who don't know how to use this:  Press and hold the Alt
  185. key, type the ASCII value of the character you want on the numeric keypad,
  186. then release the Alt key.  This works with many programs.)
  187.  
  188.  
  189. If you get strange results when loading a font, it's possible that you have
  190. an 'impure' file, one that's got some other info at the start (e.g., size
  191. indicators, a font name, possibly even a font loader).  You'll need to
  192. extract the font and put it into a file all by itself; you can do this by
  193. using an editor that will handle binary files, or by using my Extract
  194. program, or by writing a short program to do the extraction for you.
  195.  
  196. ------------------------------------------------------------------------------
  197.                                    Save Menu:
  198.  
  199. Save normally is the same as S from the edit screen.
  200.  
  201. Save as text creates a text file with each bit map represented with
  202. characters; see also the EDVA program.    (If you use a programmable text
  203. editor, you _might_ be able to set up something to let you type those large
  204. characters.  I know it can be done, 'cause I've done it on a PRIME
  205. minicomputer with EMACS.  However, it's not easy; usually it's not even
  206. possible.  If you're considering writing a stand-alone program to do this sort
  207. of thing, I recommend using the original font files rather than text versions;
  208. you'll save a lot of space that way.)
  209.  
  210. Save as C source code creates a file you can include with your variable
  211. definitions; it defines a 4096 element static char array.  If you're going to
  212. be using a font or fonts in a program, I recommend that you just load the raw
  213. font file from disk rather than incorporating it into the program.  There's no
  214. compile time penalty for this, and changing the font is much faster.  However,
  215. if you want to avoid disk accessing, or you're using a picture building font
  216. (e.g., SMOOTH.FNT) which you're not going to be changing, this might be a
  217. better way to go.  Your choice.
  218.  
  219. Save in PC Mag VGA font loader puts an executable front end on the font and
  220. saves it as a .COM file.  The resulting program is self contained and ready
  221. to run.
  222.  
  223. ------------------------------------------------------------------------------
  224.  
  225. Possible future upgrades:
  226.  
  227. Fancy handling of the font Directory (Alt-D) command; right now it just
  228. hands a DIR command to DOS.
  229.  
  230. Extension assumption (i.e., the .FNT extension would be implied by using only
  231. the basename of a file).
  232.  
  233. TSR builder:  this option would create a .COM file that would make a given
  234. font resident (i.e., resistant to most mode changes).  Actually, I'm working
  235. on putting in a mode to save a font into any other program defined in a plain
  236. text data file.  This would let you use your favorite loader(s), TSR or not,
  237. just by adding a line to the data file.
  238.  
  239. Storage of a 'default' font directly in the program.
  240.  
  241. Single column move:  this would let you use the Alt-up arrow and Alt-down
  242. arrow move a single column just as you can now move a single row.
  243.  
  244. Column/row insert and delete.
  245.  
  246. I'll add the above features when I have both the time and the interest (IOW
  247. when I get 'round tuit :) ).  If you'd really like to have one of the above
  248. enhancements, or one that's not listed, feel free to contact me.  I won't
  249. guarantee anything, but I'll at least read your letter.
  250.  
  251. ------------------------------------------------------------------------------
  252.  
  253. Thanks to:
  254.  
  255. Richard "Yes you _do_ need numbered lines!" Hardesty, for extensive beta
  256. testing and the Russian font.  (Enjoy your coffee, Richard! :) )
  257.  
  258. Hal Krause, sysop of Sparky's Corner, for making it possible for me to get
  259. the font loader and most of the fonts, and for running a great board.
  260.  
  261. Ut (that's the way it's printed in the manual), the author of the Font Mania
  262. font editor.  Even though this program doesn't get along very well with my
  263. system, it does have some good ideas in it!
  264.  
  265. Kevin Dean, for writing his CRC code and placing it in the public domain.
  266.  
  267. ------------------------------------------------------------------------------
  268.  
  269. Well, that's about it... like I said, I hope you find this program of use!
  270. Here's my address, in case you want to get in touch with me:
  271.  
  272. Rick Owens
  273. P.O. Box 1572
  274. Kalispell, MT 59903, United States
  275.  
  276. You can also probably get in touch with me on U'NI-net in the C-Programming,
  277. Science, Programming, or ChitChat conferences, among others.
  278.  
  279. ------------------------------------------------------------------------------
  280.  
  281. For those who would like to use a font in a C program, here's part of the
  282. code from my editor:
  283.  
  284. void activate_font()
  285. {
  286.    int x;
  287.    char far *font_buffer=fonts[current_font_num].buffer;
  288.    struct REGPACK r;
  289.  
  290.    r.r_ax = 0x1110;  /* Function and subfunction? */
  291.    r.r_bx = 0x1000;  /* Bytes per character (16) and block to load to
  292.                         (0 in this case). */
  293.    r.r_cx = 256;     /* # of characters to load. */
  294.    r.r_dx = 0;       /* Value of first character to load. */
  295.    r.r_es = FP_SEG(font_buffer);   /* Segment of the table. */
  296.    r.r_bp = FP_OFF(font_buffer);   /* Offset of the table. */
  297.    intr(0x10, &r);
  298. .
  299. .
  300. .
  301.  
  302. Note the use of the far pointer and the intr() function.
  303.  
  304. ------------------------------------------------------------------------------
  305.  
  306. Oh, one final note:  to use the LOADFONT program, just type
  307. LOADFONT <fontname>.  Also, take a look at the included LF.BAT file
  308. for one way to switch fonts on the fly.  See the READ.ME file for more info.
  309.